Adding a dynamic attribute "sceneInterface:linkHash" computed by LinkedScene #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The motivation for this new attribute is the following:
Two important caveats:
It computes the hash every time the attribute value is requested. No caches. Which may impact performance if used naively. The assumption is that readers would need that information only the first time, then (when time changes), they have already the knowledge of what's unique and will not require to load the attribute again. It was done that way for the sake of simplicity of implementation and should be re-evaluated if performance really becomes a problem.
It does not return the attribute by the function attributeNames(). I've opted to not add because on normal circumstances, that attribute is not important for generic readers. Only readers that know about it, will pay the price to compute it's value. Maybe if we find a way to bake the hash in the scene, then we could change that with no bad consequences.